import {promisify} from '@/utils/utils'


export const tip = (title, icon = "none", mask = false, duration = 1500) =>
  uni.showToast({ title, icon, mask, duration });
export const loading = (title = "请求中...", icon = "none", mask = false) =>
  uni.showLoading({ title, icon, mask });
export const hideLoading = promisify(uni.hideLoading)

export const showModal = (title = '', content = '', opt = {}) => uni.showModal({
  title,
  content,
  ...opt,
})
